package com.itheima.mapper;

import com.itheima.pojo.Flavors;
import com.itheima.pojo.SetmealDishes;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishesMapper {
    /**
     *  添加套餐内容
     */
    @Insert("insert into setmealdishes(id,setmealId,copies,dishId,name,price)values (#{id},#{setmealId},#{copies},#{dishId},#{name},#{price})")
    int addSetmealDishes(SetmealDishes setmealDishes);

    /**
     * 获取套餐内容
     */
    @Select("select * from setmealdishes")
    List<SetmealDishes> selectAll();

    /**
     * 修改套餐内容
     */
    List<SetmealDishes> updetesetmealdishes(SetmealDishes setmealDishes);

    /**
     * 删除套餐内容
     */
    @Delete("delete from setmealdishes where setmealId=#{setmealId}")
    int delete(String setmealId);
}
